﻿#include "EquationSolver.h"
using namespace std;

class Fc : public Function
{
public:
    double operator()(double x) {
        return x - tan(x);
    }
    double diff(double x) {
        return 1 - 1 / pow(cos(x), 2);
    }
};


int main() {
    cout << "-------------TestC---------------" << endl;
    Fc func;
    NewtonSolver newton1(4.5, eps, 15, func);
    NewtonSolver newton2(7.7, eps, 15, func);
    cout << "root = " << newton1.solve() << "    " << "f(root) = " << newton2.solve() << endl;
    return 0;
}